package com.server.pinggu.service.impl;

import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.apache.commons.lang3.StringUtils;
import com.server.pinggu.mapper.SenCountSellMapper;
import com.server.pinggu.domain.SenCountSell;
import com.server.pinggu.service.ISenCountSellService;

import java.util.List;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ltao
 * @date 2022-10-23
 */
@Service
public class SenCountSellServiceImpl extends ServiceImpl<SenCountSellMapper, SenCountSell> implements ISenCountSellService {

    @Override
    public List<SenCountSell> queryList(SenCountSell senCountSell) {
        LambdaQueryWrapper<SenCountSell> lqw = Wrappers.lambdaQuery();
        if (senCountSell.getGid() != null){
            lqw.eq(SenCountSell::getGid ,senCountSell.getGid());
        }
        if (senCountSell.getUid() != null){
            lqw.eq(SenCountSell::getUid ,senCountSell.getUid());
        }
        if (senCountSell.getNum() != null){
            lqw.eq(SenCountSell::getNum ,senCountSell.getNum());
        }
        if (senCountSell.getPrice() != null){
            lqw.eq(SenCountSell::getPrice ,senCountSell.getPrice());
        }
        if (senCountSell.getDtime() != null){
            lqw.eq(SenCountSell::getDtime ,senCountSell.getDtime());
        }
        return this.list(lqw);
    }
}